<?php

use \app\service\auth;
use Illuminate\Database\Capsule\Manager as DB;


class Agent_IndexController extends CommonController
{
    public function infoAction()
    {
        $user = auth::userinfo();
        $data = [
            'agent_form' => false,
            'upgrade_display' => '',
            'become_agent' => '',
            'data' => [
                'agent_level' => $user['agent']['level'] ?? null,
                'delay_money' => $user['agent']['delay_money'] ?? 0,
                'earned_money' => $user['agent']['earned_money'] ?? 0,
                'total_income' => $user['agent']['total_income'] ?? 0,
            ],
        ];
        json(['code' => 1, 'msg' => '获取成功', 'data' => $data]);
    }
}
